program Project6;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 n, n1:int64;
 i:integer;
 x, y, p, rp:double;
 fout:textFile;
begin
  randomize;
  assignFile(fout,'output.txt');
  rewrite(fout);
  n:=0;
  n1:=0;
  for i:= 1 to 1000000000 do
  begin
    x:=2*random;
    y:=2*random;
    if (sqr(x-1)+sqr(y-1)<=1) then
      n1:=n1+1;
    n:=n+1;
    if (i mod 10000=0) then
    begin
      p:=4*n1/n;
      rp:=p-pi;
      writeln(fout, rp:0:25);
    end;
  end;
  closeFile(fout);
end.
 